<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>什么是em</title>
</head>
<body>
    <div class="parent">
        <div class="son"></div>
    </div>
</body>
<style>

    .parent{
        width: 50em;
        height: 50em;
        /* font-size: 20px; */
    }

    .son{
        /**一个em 16px**/
        /**父元素上设置了font-size em**/
        width: 10em;
        height: 10em;
        background-color: antiquewhite;
        margin:0 auto;
    }

</style>
</html>